// @ts-ignore
/* eslint-disable */
import request from '@/utils/request';

export async function getRoleList(params: any) {
  return request('/api/v1/role/getRoleList', {
    method: 'POST',
    params: {
      ...params,
    },
  });
}

/** 添加分类 */
export async function createRole(params: any) {
  return request('/api/v1/role/createRole', {
    method: 'POST',
    data: params,
  });
}

/** 更新分类 */
export async function updateRole(params: any) {
  return request('/api/v1/role/updateRole', {
    method: 'POST',
    data: params,
  });
}
/** 删除分类 */
export async function batchDelete(params: any) {
  return request('/api/v1/role/batchDelete', {
    method: 'POST',
    data: params,
  });
}

/** 获取所有角色 */
export async function getTotalRoles() {
  return request('/api/v1/role/getTotalRoles', {
    method: 'GET',
  });
}
